//
//  HSQClassificationListCell.m
//  LiTianDecoration
//
//  Created by administrator on 2018/8/3.
//  Copyright © 2018年 administrator. All rights reserved.
//

#import "HSQClassificationListCell.h"
#import "HSQCategoryListModel.h"

@interface HSQClassificationListCell ()



@end

@implementation HSQClassificationListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        UILabel *CategoryName_Label = [[UILabel alloc] init];
        CategoryName_Label.font = [UIFont systemFontOfSize:13.0];
        CategoryName_Label.textColor = RGB(71, 71, 71);
        [self.contentView addSubview:CategoryName_Label];
        self.CategoryName_Label = CategoryName_Label;
        
        UIImageView *Category_imageView = [[UIImageView alloc] init];
        Category_imageView.image = KImageName(@"btn_check");
        [self.contentView addSubview:Category_imageView];
        self.Category_imageView = Category_imageView;
        
        // 添加约束
        self.Category_imageView.sd_layout.rightSpaceToView(self.contentView, 10).centerYEqualToView(self.contentView).widthIs(20).heightIs(15);
        
        self.CategoryName_Label.sd_layout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.contentView, 0).bottomSpaceToView(self.contentView, 0).rightSpaceToView(self.Category_imageView, 10);
    }
    
    return self;
}

/**
 * @brief 分类数据
 */
- (void)setModel:(HSQCategoryListModel *)model{
    
    _model = model;
    
    self.CategoryName_Label.text = model.categoryName;
    

}

- (void)setFrame:(CGRect)frame{
    
    frame.origin.y += 3;
    
    frame.size.height -= 6;
    
    [super setFrame:frame];
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    
    [super setSelected:selected animated:animated];

   
}

@end
